const platformLayout = () => import('@/layout/platforms/work_wechat/index.vue')

const workWechatRoutes = [
  // 平台使用
  {
    path: '/work_wechat',
    component: platformLayout,
    name: '',
    meta: { title: '企业微信', roles: ['customer'] },
    children: [
      {
        path: '/work_wechat',
        name: 'work_wechat_index',
        component: () => import('@/views/platform/work_wechat/index.vue'),
        meta: { title: '控制台' }
      },
      {
        path: 'addon',
        name: 'work_wechat_addon',
        component: () => import('@/views/platform/work_wechat/addon.vue'),
        meta: { title: '应用管理' }
      },
      {
        path: 'setting',
        name: 'work_wechat_setting',
        component: () => import('@/views/platform/work_wechat/setting.vue'),
        meta: { title: '系统设置' }
      }
    ]
  },
  {
    path: '/work_wechat/kf',
    name: 'work_wechat_kf',
    component: platformLayout,
    meta: { title: '微信客服' },
    children: [
      {
        path: 'msg',
        name: 'work_wechat_kf_msg',
        component: () => import('@/views/platform/work_wechat/Kf/Msg.vue'),
        meta: { title: '消息记录' }
      },
      {
        path: 'user',
        name: 'work_wechat_kf_user',
        component: () => import('@/views/platform/work_wechat/Kf/User.vue'),
        meta: { title: '用户列表' }
      },
      {
        path: 'service',
        name: 'work_wechat_kf_service',
        component: () => import('@/views/platform/work_wechat/Kf/Service.vue'),
        meta: { title: '客服列表' }
      }
    ]
  }
]

export default workWechatRoutes
